//
// api.js
// vue3-element-admin
//
// Created by 区区电脑 on 2023/04/11.
//


import request from "@/request"


// 同步任务
export function SyncTaskJob(data = {}) {
    return request({
        url: "/api/TaskJobDetail/SyncTaskJob",
        method: "post",
        data,
    });
}
// 修改任务
export function UpdateTaskJobDetail(data = {}) {
    return request({
        url: "/api/TaskJobDetail/UpdateTaskJobDetail",
        method: "put",
        data,
    });
}
// 删除任务
export function DeleteTaskJobDetail(params = {}) {
    return request({
        url: "/api/TaskJobDetail/DeleteTaskJobDetail",
        method: "delete",
        params,
    });
}
// 启动任务
export function StartTaskJob(params = {}) {
    return request({
        url: "/api/TaskJobDetail/StartTaskJob",
        method: "get",
        params,
    });
}
// 停止任务
export function StopTaskJob(params = {}) {
    return request({
        url: "/api/TaskJobDetail/StopTaskJob",
        method: "get",
        params,
    });
}
// 查询任务列表
export function GetJobDetailList(data = {}) {
    return request({
        url: "/api/TaskJobDetail/GetJobDetailList",
        method: "post",
        data,
    });
}
// 查询分页任务列表
export function GetJobDetailPageList(params = {}, data = {}) {
    return request({
        url: "/api/TaskJobDetail/GetJobDetailPageList",
        method: "post",
        params,
        data,
    });
}

/** 触发器 **/

// 添加触发器
export function AddTaskJobTrigger(data = {}) {
    return request({
        url: "/api/TaskJobTrigger/AddTaskJobTrigger",
        method: "post",
        data
    })
}
// 修改触发器
export function UpdateTaskJobTrigger(data = {}) {
    return request({
        url: "/api/TaskJobTrigger/UpdateTaskJobTrigger",
        method: "put",
        data
    })
}

// 删除触发器
export function DeleteTaskJobTrigger(params = {}) {
    return request({
        url: "/api/TaskJobTrigger/DeleteTaskJobTrigger",
        method: "delete",
        params
    })
}
// 查询触发器列表
export function GetJobTriggerList(data = {}) {
    return request({
        url: "/api/TaskJobTrigger/GetJobTriggerList",
        method: "post",
        data
    })
}

// 查询触发器分页列表
export function GetJobTriggerPageList(params = {}, data = {}) {
    return request({
        url: "/api/TaskJobTrigger/GetJobTriggerPageList",
        method: "post",
        params,
        data
    })
}
